# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=vis
pkgver=0.7
_testver=0.5
pkgrel=1
pkgdesc="Modern, legacy free, simple yet efficient vim-like editor"
url="https://github.com/martanne/vis"
arch="all"
license="ISC"
depends="!outils-vis lua5.3-lpeg"
makedepends="libtermkey-dev ncurses-dev acl-dev lua5.3-dev"
checkdepends="vim"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/martanne/vis/archive/v$pkgver.tar.gz
	$pkgname-test-$pkgver.tar.gz::https://github.com/martanne/vis-test/archive/v$_testver.tar.gz
	0001-lexers-fix-bug-in-bash-lexer-for-last-here-doc.patch
	"
_testdir="$srcdir"/$pkgname-test-$_testver

build() {
	./configure \
		--prefix=/usr \
		--enable-lua \
		--enable-acl
	make
}

check() {
	cp -r "$_testdir"/* ./test/
	make test
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
ccc6a054fea6917e7751882468a74c30c712f7ec400a913c95c0084691f706e2bee54efb86b75be8b121c9a209c7e587e72e5474c55271d9943e91fc8aaf9bac  vis-0.7.tar.gz
c41b40f23a45a7ebd9c16aa853d9c3b517767cb88ff8dc268da44276a02aa8c77de0fc6aa243a1e4cdfbc27182870b82d0b9bc892bb87ea74d5275d76c554ed1  vis-test-0.7.tar.gz
1bbdb4deb9187d334e8a740277a9fa4afe2de095582f9823d210e02dca4d6305fa3f3203eab78f07f43276712265de2040c176a99149a0f8dbefd768b848b1d1  0001-lexers-fix-bug-in-bash-lexer-for-last-here-doc.patch
"
